package com.whut.mapper;

import com.whut.model.Contracttaskaccept;
import com.whut.model.ContractTaskProject;
import com.whut.model.Problemcollect;
import com.whut.v_model.*;
import com.whut.v_vo.comperInsReportBaseVO.PartOneHeadVO;

import java.util.List;

public interface ContracttaskprojectMapper {
    int deleteByPrimaryKey(Integer projectId);

    int insert(ContractTaskProject record);

    int insertSelective(ContractTaskProject record);

    ContractTaskProject selectByPrimaryKey(Integer projectId);

    int updateByPrimaryKeySelective(ContractTaskProject record);

    int updateByPrimaryKey(ContractTaskProject record);

    /*my methods*/
    List<ContractTaskProject> getAllProject();

    //根据工程id拿到工程信息
    List<ContractTaskProject> selectAllByCheckId(int projectId);

    List<ContractTaskProject> getProjectInfoBySearchParams(String searchParams);

    List<ContractTaskProject> getAllProjectByTime(String startTime, String endTime);

    @Deprecated
    List<ContractTaskProject> getProjectsByCycle(int taskId);

    List<SiteSchedule> example();

    List<Object> getAllUnitByUnitType(String unitType);

    List<Integer> getAllProjectId(String unitType, String unitName);

    int insertInfo(ContractTaskProject record);

    int getProjectIdByProjectName(String projectName);

    List<String> getAllUnitByTypeAndTime(String unitType);

    List<String> getUnitByTypeAndTime(int contractId, String unitType);

    //寻找所有有地理信息的工地
    List<ContractTaskProject> getAllPoint(int contractId);

    List<ContractTaskProject> getListByContractId(int contractId);

    ContractTaskProject getByCCTMkey(int checkId);


    List<CheckAndProject> selectAllByTaskIdAndTimeAndUnit(int taskId, String startTime, String endTime, String unitType, String unitName);

    List<CheckAndProject> selectAllByTaskId(int taskId, String startTime, String endTime);

    //wyh
    /*从数据库总获取所有信息*/
    List<ContractTaskProject> getAllProjectInfo(int contractId);

    /*获取所有项目坐标*/
    List<GeoInfo> getuncompletedPosition();

    List<GeoInfo> getPosition();

    List<GeoInfo> getPositionByContract(int contractId);

    List<GeoInfo> getPositionById(int projectId);

    List<CheckAndProject> getAllProjectForReportOnlyByClientAndTime(int contractId, String startTime, String endTime);

    List<CheckAndProject> getAllProjectForReportOnlyByClientAndTaskAndTime(int contractId, String startTime, String endTime, List<Integer> list);

    List<CheckAndProject> getAllProjectForReportOnlyByClientAndTaskAndAndCheckTime(int contractId, String startTime, String endTime, List<Integer> list2, List<Integer> list3);

    List<CheckAndProject> getCheckAndPointOrderByPoint(List<Integer> list);

    List<CheckAndProject> selectAllProjectForFuzzyClusterType1(int taskId, String startTime, String endTime, String clusterType);

    List<CheckAndProject> selectAllProjectForFuzzyClusterType2(int taskId, String startTime, String endTime, String clusterType);

    List<CheckAndProject> selectAllProjectForFuzzyClusterType3(int taskId, String startTime, String endTime, String clusterType);

    String getProjectNameByCheckId(int checkId);

    /**
     * @param (checkId)
     * @return java.util.List<com.whut.model.Contracttaskproject>
     * @auther wenyihan
     * 获取建设工程施工安全监督抽查记录的表头，包含工程名称，形象进度，抽查时间
     * @date 15:43 2019/10/11
     */
    List<ContractTaskProject> getHeader(int checkId);

    /**
     * @param （checkId）
     * @return java.util.List<com.whut.model.Contracttaskproject>
     * @auther wenyihan
     * 通过checkId获取巡查表的表头数据，包括工程名称、形象进度、检查日期、建设单位、施工单位、监理单位
     * @date 9:00 2019/10/15
     */
    List<ContractTaskProject> getPatrolHeader(int checkId);

    List<ContractTaskProject> getAllUnfinishedInfo();

    List<Problemcollect> getProjectInfoByContractId(Integer contractId, Integer firstId);

    List<ContractTaskProject> selectAllFixInfo();

    Integer getFixTaskIdByProjectId(int projectId);


    List<ProjectNum> getProjectNumByArea(String area);

    List<ContractTaskProject> getProjectLocByContractIds(List<Integer> list);

    List<CTPInfo> getCTPInfoByContractId(Integer contractId);

    List<Object> getAllsgUnit();

    List<Object> getAlljsUnit();

    List<Object> getAlljlUnit();

    //LYL

    List<ContractTaskProject> getDataByContractId(Integer contractId);

    String getProjectCategoryByProjectId(int projectId);

    String getProjectNameByProjectId(int projectId);

    List<String> getJsUnitByContractId(List<Integer> list);

    List<String> getGsUnitByContractId(List<Integer> list);

    List<String> getJlUnitByContractId(List<Integer> list);

    List<Contracttaskaccept> getProjectBYTasKIdAndContractId(List<Integer> contractList, List<Integer> taskList);


    /**
     * @auther LK
     */
    public ContractTaskProject getProjectInfoByProjectId(int projectId);

    /**
     * @author： wenyihan
     * @date： 19:16 2020/11/29
     * @param： [checkId, projectId]
     * @return： com.whut.v_vo.comperInsReportBaseVO.PartOneHeadVO
    */
    PartOneHeadVO getComInsReportPartOne(int projectId, int checkId);

    List<Contracttaskaccept> getProjectNameByValue(String value,int contractId);
}